# _*_ coding : utf-8 _*_
# @Time : 2022/8/14 19:33
# @Author : Moonquake
# @File : 29.request_get请求
# @Project : python
import requests

url = 'https://www.baidu.com/s?'

headers = {
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54'
}
data = {
    'wd':'北京'
}
# url 请求资源路径     ?可以加也可以不加
# params 参数
# kwargs 字典
response = requests.get(url= url,params=data,headers=headers)
response.encoding = 'utf-8'
content = response.text
print(content)